package com.syl.orm.ibatis;

/**
 * @Description: 默认查询方法实现
 * @author: YunLong
 * @date: 2022-08-25 16:32
 **/
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private final Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration.connection, configuration.mapperElement);
    }
}
